package org.dromara.vehicle.modules.driver.domain.bo;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.vehicle.modules.driver.domain.DriverBasicInfo;

import java.util.Date;

/**
 * 驾驶员基本信息业务对象 driver_basic_info
 *
 * @author ckk
 * @date 2025-06-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DriverBasicInfo.class, reverseConvertGenerate = false)
public class DriverBasicInfoBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 驾驶员用户Id
     */
    @NotNull(message = "驾驶员用户Id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long driverUserId;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 性别
     */
    @NotBlank(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class })
    private String gender;

    /**
     * 身份证号
     */
    @NotBlank(message = "身份证号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String idNumber;

    /**
     * 联系方式
     */
    @NotBlank(message = "联系方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactPhone;

    /**
     * 驾驶证号
     */
    @NotBlank(message = "驾驶证号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String licenseNumber;

    /**
     * 准驾车型
     */
    @NotBlank(message = "准驾车型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String licenseType;

    /**
     * 驾驶证有效期止
     */
    @NotNull(message = "驾驶证有效期止不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    private Date expirationDate;

    /**
     * 备注
     */
    private String remarks;


}
